import { request } from '@/services/request';

import type { transOilStockParams, getOilListParams, createOilParams, getOilInfoParams, updateOilParams, reduceOilStockParams, logParams, getSupplierByProParams } from './data';

//获取货品列表
export async function getOilList(data: getOilListParams) {
    return request('/adminapi/getOilList', {
        params: data,
    });
}

//创建货品
export async function createOil(data: createOilParams) {
    return request('/adminapi/createOil', {
        params: data,
    });
}


export async function getOilInfo(data: getOilInfoParams) {
    return request('/adminapi/getOilInfo', {
        params: data,
    });
}

export async function updateOil(data: updateOilParams) {
    return request('/adminapi/updateOil', {
        params: data,
    });
}


export async function reduceOilStock(data: reduceOilStockParams) {
    return request('/adminapi/reduceOilStock', {
        params: data,
    });
}


export async function addOilStock(data) {
    return request('/adminapi/addOilStock', {
        params: data,
    });
}

export async function getOilStockLog(data: logParams) {
    return request('/adminapi/getOilStockLog', {
        params: data,
    });
}

export async function getProSupRelation(data) {
    return request('/adminapi/getProSupRelation', {
        params: data,
    });
}

export async function getSupplierByPro(data: getSupplierByProParams) {
    return request('/adminapi/getSupplierByPro', {
        params: data,
    });
}

export async function transOilStock(data: transOilStockParams) {
    return request('/adminapi/transOilStock', {
        params: data,
    });
}
export async function getInStockList(data) {
    return request('/adminapi/getInStockList', {
        params: data,
    });
}

export async function lossOilStock(data) {
    return request('/adminapi/lossOilStock', {
        params: data,
    });
}







